#!/usr/bin/perl

use utf8;
use strict;
use warnings;
use autodie;
use 5.010;

my $Debug = $ENV{DEBUG} // 1;

my $number = int(1 + rand 100);
print "The number is $number\n";

while (<>) {

	chomp;
	
	if ('quit' || 'exit'){
		last;
	}elsif ($_ > $number) {
		print "Too hight\n";
	}elsif ($_ < $number) {
		print "Too small\n";
	}elsif ($_ eq $number) {
		print "Great\n";
		last;
	}else {
		print "input error\n";
	}
}